1. Field of the Invention
This invention relates generally to computer I/O subsystems having a peripheral bus, and more particularly to methods for assigning addresses to expanded devices in I/O subsystems.
2. Description of the Related Art
Modern computer systems often utilize one or more buses to connect to peripheral devices to enhance its resources. For example, the resources of a computer system may be substantially increased by connecting the computer system to one or more peripheral devices such as disk drives, tape drives, printers, scanners, optical drives, and the like. These peripheral devices are attached to the computer system by means of a peripheral bus (e.g., cable).
One of the most widely used peripheral buses is the well known small computer systems interface (SCSI) bus, which is defined in conformity with well known SCSI protocols (e.g., SCSI-1, SCSI-2, SCSI-3, etc.), which are incorporated herein by reference. The SCSI protocols are designed to provide an efficient peer-to-peer I/O interface between a host computer and its peripheral devices in a computer system.
FIG. 1 shows a block diagram of a conventional computer system 100 including a host computer 102, a plurality of SCSI devices 106, and a SCSI bus 108. The host computer 102 includes a SCSI host adapter 104 for communicating with the SCSI devices 106. The host adapter 104 in the computer system 100 controls communication between the host computer 102 and the SCSI devices 106. For example, the host adapter 104 provides a physical connection between the computer 102 and the SCSI bus 108. In addition, it is configured to receive data, address, and control signals from the host computer 102 and convert the signals into corresponding SCSI compatible data, address, and control signals. Conversely, the SCSI host adapter 104 is also configured to receive SCSI compatible data, address, and control signals from the SCSI devices 106 through the SCSI bus 108 and convert them into corresponding host-bus compatible data, addressing, and control signals. The SCSI host adapter 104 is well known in the art and may be implemented, for example, by using AIC-7890A(trademark) packaged semiconductor device, which is available from Adaptec Inc., of Milpitas, California.
Under the conventional SCSI specifications, the SCSI bus 108 may connect up to 16 SCSI devices including the host adapter 104 depending on the type of SCSI bus implemented. The SCSI devices 106 may be peripheral devices such as disk drives, tape drives, printers, scanners, optical drives, or any other devices that meet the SCSI specification. The SCSI bus 108 is typically implemented as a cable having a set of parallel wires. For example, the SCSI-1 cable has 50 wires. Of these 50 wires, eight wires are for data, one wire is for parity, nine wires are for control, 25 wires are for ground, and the remaining wires are for power or are reserved for future use. The eight data wires are used to carry eight bits of data in parallel. In general, conventional SCSI bus cables include either 8 or 16 data wires for carrying 8 or 16 bits, respectively, of data in parallel. The data wires in the bus thus define a datapath for communicating bits equal to the number of data wires in the bus.
A traditional SCSI bus may accommodate a plurality of SCSI devices up to a maximum number equal to the number of data bits in the SCSI bus. In practice, the width of the SCSI datapath is typically 8 or 16 bits corresponding to the number of data wires in the SCSI bus. This means the maximum number of SCSI devices, including a host adapter, that can be attached to a SCSI bus is limited to 8 or 16.
Conventional SCSI buses, however, are generally capable of transmitting signals reliably for a specified cable length only. For example, SCSI bus cables conforming to SCSI specifications are typically limited to a maximum length such as 3, 6, 12, or 25 meters, and the like. In modem computer systems such as servers that need to communicate with numerous SCSI devices, some SCSI peripheral devices may be located more than the specified cable length away from a host computer.
In such instances, an expander, which is essentially a repeater, is typically used to add another SCSI bus, which is then used to couple additional SCSI devices. FIG. 2 illustrates a conventional computer system 200 that includes an expander 214 for connecting two SCSI buses 208 and 210. In the computer system 200, a host computer 202 is coupled to the SCSI bus 208 via a SCSI host adapter 204. One or more SCSI devices 206 are coupled to the SCSI bus 208 while one or more SCSI devices 212 and enclosure chips 216 are coupled to the SCSI bus 210. The enclosure chips 216 are configured to control enclosure functions such as power control, temperature sensing, fan control, etc. The expander 214 is coupled between the SCSI buses 208 and 210 to regenerate signals received on either SCSI bus 208 or 210 for transmission to the other SCSI bus. In this configuration, the expander 214 functions to extend the length of the overall SCSI bus so that additional SCSI devices 212 or expanders can be attached to the SCSI bus 210. The SCSI devices 212 and 216 together with SCSI bus 210 are collectively referred to as a segment. Similarly, the host adapter 204, SCSI devices 208, and SCSI bus 210 collectively define another segment.
Unfortunately, however, conventional expanders are typically transparent devices without SCSI IDs of their own. This means that the expanders are not addressable and are thus invisible to SCSI protocol. Using such transparent expanders without dedicated SCSI IDs in an I/O subsystem presents several drawbacks. For example, individual segments of the I/O subsystem often need to be modified to isolate faulty cables, connections, drivers, and receivers. In addition, it is often desirable to communicate with individual expanders to determine optimum speed at which the expanders can communicate during domain validation. Because conventional expanders are not addressable, these modifications and domain validation processes may not be performed automatically without a system administrator.
One obvious solution would be to implement expanders like SCSI devices by adding SCSI controllers and assigning SCSI IDs used for SCSI devices. This solution, however, would reduce the number of addressable SCSI devices that can be attached to a SCSI I/O subsystem. Further, non-data SCSI devices such as enclosure chips need to be addressable for control and status functions. Using normal SCSI IDs for such addresses would further reduce the number of functional SCSI devices.
In view of the foregoing, what is needed is a method for assigning IDs to expanders and enclosure chips without using conventional SCSI IDs so as to allow addressing of individual expanders and/or enclosure chips.
The present invention fills these needs by providing methods for assigning addresses to expanded devices such as expanders, enclosure chips, terminators, or the like in a computer I/O subsystem. It should be appreciated that the present invention can be implemented in numerous ways, including as a process, an apparatus, a system, a device, a method, or a computer readable medium. Several inventive embodiments of the present invention are described below.
In one embodiment, the present invention provides a method for assigning addresses to expanders in a computer I/O subsystem. The I/O subsystem includes one or more buses with each bus having an N-bit data bus for communication. One or more expanders are provided in the computer I/O subsystem with each expander being arranged to couple a pair of buses for communicating data and control signals. An expander address space is defined for the expanders by partitioning an N-bit data bus into a pair of fields that includes an expander ID field and an expander signature field. An address is assigned to each of the expanders such that each address includes a common expander signature in the expander signature field and an expander ID in the expander ID field. Each address of the expanders is configured to have more than two bits are asserted.
In another embodiment, the present invention provides a method for assigning addresses to expanded devices in a computer I/O subsystem, which has one or more buses. Each bus has an N-bit data bus for communication. One or more types of expanded devices are provided in the computer I/O subsystem and are coupled to one or more peripheral buses. An expanded address space is defined for the one or more types of expanded devices by partitioning an N-bit data bus into a pair of fields that includes an expanded ID field and an expanded signature field. An address is assigned to each of the expanded devices by assigning an expanded signature to each type of the expanded devices. In addition, an expanded ID is assigned to each expanded device within each type of the expanded devices, wherein more than two bits are asserted in the address. Preferably, the addresses of the expanded devices are configured to encode a selection for selecting an expanded device, a broadcast function for broadcasting a command to all expanded devices with the same expanded signature, or a target function adapted to select one of the expanded device for performing a function.